﻿using System;
namespace OOP2
{
    public class Vivo
    {
        private string _name;
        private string _color;
        private int _gas;

        public Vivo(string name, string color, int gas)
        {
            _name = name;
            _color = color;
            _gas = gas;
        }

        public string name { get => _name; set { _name = value; } }
        public string color { get => _color; set { _color = value; } }
        public int calculate_fuel_for_trip(int trip_distance)
        {
            return trip_distance / _gas;
        } 

        public void print_car_details()
        {
            Console.WriteLine("---car details---");
            Console.WriteLine("name:{0}", _name);
            Console.WriteLine("color:{0}", _color);
            Console.WriteLine("gas:{0} mpg", _gas);
        }
    } 

    class program
    {
        static void Main(string[] args)
        {
            Vivo car = new Vivo("wzy", "green0", 42);

            car.name = "test";
            car.print_car_details();

            Console.ReadKey();
        }
    }
}
